package com.ocom.payhandle.feign;

import com.ocom.common.constant.UnifiendPayUrl;
import com.ocom.common.entity.card.EntityXfGoodListOrg;
import com.ocom.common.entity.card.EntityXfRecord;
import com.ocom.common.entity.card.EntityXfRecordProcess;
import com.ocom.common.request.payconfig.mealorder.RefundOrderDishesRequest;
import com.ocom.common.request.xfrecde.XfOrderVerificationRequest;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Component
@FeignClient(value = "xfrecode")
public interface XfRecordFeign {

    @PostMapping(UnifiendPayUrl.URL_sveXfRecord)
    Result sveXfRecord(@RequestBody EntityXfRecordProcess entityXfRecord);

    @PostMapping(UnifiendPayUrl.URL_sveXfRecord)
    Result sveXfRecord(@RequestBody EntityXfRecord entityXfRecord);

    @PostMapping(UnifiendPayUrl.URL_deleteXfRecord)
    Result deleteXfRecord(@RequestBody EntityXfRecord entityXfRecord);

    @PostMapping(UnifiendPayUrl.URL_updateXfRecord)
    Result updateXfRecord(@RequestBody EntityXfRecord entityXfRecord);

    //获取饭堂消费的情况
    @PostMapping(UnifiendPayUrl.URL_xfUserparam)
    public Result xfUserparam(@RequestBody EntityXfRecord entityXfRecord);

    //获取饭堂消费的情况
    @PostMapping(UnifiendPayUrl.URL_xfUserparamDiscount)
    public Result xfUserparamDiscount(@RequestBody EntityXfRecord entityXfRecord);

    //获取饭堂消费次数
    @PostMapping(UnifiendPayUrl.URL_times)
    public Result times(@RequestBody EntityXfRecord entityXfRecord);

    //获取饭堂消费次数
    @PostMapping(UnifiendPayUrl.URL_timesManJian)
    public Result timesManJian(@RequestBody EntityXfRecord entityXfRecord);


    @PostMapping(UnifiendPayUrl.URL_saveXfGoodList)
    public Result saveXfGoodList(@RequestBody EntityXfGoodListOrg entityXfGoodListOrg);

    @PostMapping(UnifiendPayUrl.URL_saveXfGoodListBatch)
    public Result saveXfGoodListBatch(@RequestBody List<EntityXfGoodListOrg> list);

    @PostMapping(UnifiendPayUrl.URL_refundXfGoodList)
    public Result refund(@RequestBody RefundOrderDishesRequest request);

    @PostMapping(UnifiendPayUrl.URL_orderVerification)
    public Result orderVerification(@RequestBody XfOrderVerificationRequest request);

    @PostMapping(UnifiendPayUrl.URL_updateXfFace)
    public Result updateXFace(@RequestBody EntityXfRecord entityXfRecord);


    @GetMapping("/test3")
    public int yt5();
}
